﻿using System.Windows.Forms;

namespace VMWareLabWorkflowsDataContracts
{
    using System.Collections.Generic;

    public partial class VMWareLabDetailsDialogWinForm : Form
    {
        private Dictionary<string, UserControl> userControls;

        public VMWareLabDetailsDialogWinForm()
        {
            InitializeComponent();

            this.userControls = new Dictionary<string, UserControl>();
            this.userControls.Add("BuildDetailsControl", new BuildDetailsControl());
            this.userControls.Add("EnvironmentDetailsControl", new EnvironmentDetailsControl());
        }

        private void ChangeContent(string userControlName)
        {
            this.panel1.Controls.Clear();
            this.panel1.Controls.Add(this.userControls[userControlName]);
        }

        private void lblWelcome_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {

        }

        private void lblEnvironment_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.ChangeContent("EnvironmentDetailsControl");
        }

        private void lblBuild_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.ChangeContent("BuildDetailsControl");
        }
    }
}
